<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ts_menuinfo.*" %>
<%@page import="java.util.*" %>
<%@page import="com.lmpop.frame.dao.MenuInfo" %>
<html>
  <head>
    
    <title>菜单管理</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Ts_menuinfoInfo.js'></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>	
	<script type='text/javascript' src='/js/jquery-1.4.2.min.js'></script>	
	<script type='text/javascript' src='js_menu.js'></script>	
</head>

<body>

  <% 
	MenuInfo menuInfo = new MenuInfo();
	String module_id = menuInfo.getFourRandnum();
  	String s_menu_id="";
  	if(request.getParameter("menu_id")!=null) s_menu_id = request.getParameter("menu_id");
  	Ts_menuinfoInfo ts_menuinfoInfo = new Ts_menuinfoInfo();
  	List list = ts_menuinfoInfo.getListByPk(s_menu_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String menu_id="",menu_name="",up_menu_id="",menu_class="",menu_type="",in_param_code1="",in_param_value1="",in_param_code2="",in_param_value2="",in_param_code3="",in_param_value3="",remove_tag="",rsrv_str1="",rsrv_str2="",rsrv_str3="",rsrv_str4="",rsrv_str5="",rsrv_str6="",rsrv_str7="",rsrv_str8="",rsrv_str9="",rsrv_str0="",in_staff_id="",in_date="",remark="";
  	String subsys_code="",module_name="",module_file="",module_dir="",up_menu_name="";
	
	if(map.get("module_name")!=null) module_name = map.get("module_name").toString();
	if(map.get("module_file")!=null) module_file = map.get("module_file").toString();
	if(map.get("module_dir")!=null) module_dir = map.get("module_dir").toString();
	if(map.get("up_menu_name")!=null) up_menu_name = map.get("up_menu_name").toString();
	
	if(map.get("subsys_code")!=null) subsys_code = map.get("subsys_code").toString();
	if(map.get("menu_id")!=null) menu_id = map.get("menu_id").toString();
  	if(map.get("menu_name")!=null) menu_name = map.get("menu_name").toString();
  	if(map.get("up_menu_id")!=null) up_menu_id = map.get("up_menu_id").toString();
  	if(map.get("menu_class")!=null) menu_class = map.get("menu_class").toString();
  	if(map.get("menu_type")!=null) menu_type = map.get("menu_type").toString();
  	if(map.get("module_id")!=null) module_id = map.get("module_id").toString();
  	if(map.get("in_param_code1")!=null) in_param_code1 = map.get("in_param_code1").toString();
  	if(map.get("in_param_value1")!=null) in_param_value1 = map.get("in_param_value1").toString();
  	if(map.get("in_param_code2")!=null) in_param_code2 = map.get("in_param_code2").toString();
  	if(map.get("in_param_value2")!=null) in_param_value2 = map.get("in_param_value2").toString();
  	if(map.get("in_param_code3")!=null) in_param_code3 = map.get("in_param_code3").toString();
  	if(map.get("in_param_value3")!=null) in_param_value3 = map.get("in_param_value3").toString();
  	if(map.get("remove_tag")!=null) remove_tag = map.get("remove_tag").toString();
  	if(map.get("rsrv_str1")!=null) rsrv_str1 = map.get("rsrv_str1").toString();
  	if(map.get("rsrv_str2")!=null) rsrv_str2 = map.get("rsrv_str2").toString();
  	if(map.get("rsrv_str3")!=null) rsrv_str3 = map.get("rsrv_str3").toString();
  	if(map.get("rsrv_str4")!=null) rsrv_str4 = map.get("rsrv_str4").toString();
  	if(map.get("rsrv_str5")!=null) rsrv_str5 = map.get("rsrv_str5").toString();
  	if(map.get("rsrv_str6")!=null) rsrv_str6 = map.get("rsrv_str6").toString();
  	if(map.get("rsrv_str7")!=null) rsrv_str7 = map.get("rsrv_str7").toString();
  	if(map.get("rsrv_str8")!=null) rsrv_str8 = map.get("rsrv_str8").toString();
  	if(map.get("rsrv_str9")!=null) rsrv_str9 = map.get("rsrv_str9").toString();
  	if(map.get("rsrv_str0")!=null) rsrv_str0 = map.get("rsrv_str0").toString();
  	if(map.get("in_staff_id")!=null) in_staff_id = map.get("in_staff_id").toString();
  	if(map.get("in_date")!=null) in_date = map.get("in_date").toString();
  	if(map.get("remark")!=null) remark = map.get("remark").toString();

  %>
	
	<h1>修改菜单</h1>
	
	<!--
	<table width="100%" align="center" cellpadding="0" cellspacing="0" class="dl_so">
        <tr>
          <td width="9%" align="center"><img src="/program/admin/index/images/ban_01.gif" /></td>
          <td width="91%" align="left">
		  <h4>-----------------</h4>
		  <span>1----------------。</span><br/>
		  <span>2----------------。</span>
		  </td>
        </tr>
      </table>
      <br/>
	  -->
	
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="0" cellspacing="1" border="0" class="listtab">

		<tr>
			<td align="right" width="10%">
				菜单名称:
			</td>
			<td><input name="menu_name" id="menu_name" value="<%=menu_name %>" type="text" /></td>
		</tr>
		<script>
		setTopMenu('<%=subsys_code%>');
		</script>
		<tr>
			<td align="right" width="10%">
				上级菜单:
			</td>
			<td>
			<div id="up_menu_show" style="display: block;">
				<%=up_menu_name%>
				<input type="button" name="buttons" value="重新选择" style="cursor:pointer;" class="buttoncss" onClick="ChangeClassStyle();" />
			</div>
			<div id="up_menu_hidden" style="display:none" >
			<select name="top_menu_select" id="top_menu_select" onchange="setSecMenu(this.value);" onclick="updateClass(this.value,2);" style="width:100px">
			<option value="">无上级</option>
			</select>
			<select name="sec_menu_select" id="sec_menu_select"  onclick="updateClass(this.value,3);" style="width:100px">
			<option value="">请选择</option>
			</select>			
			<input name="up_menu_id" id="up_menu_id" value="<%=up_menu_id %>" type="hidden" />		
			<input name="up_menu_id_bak" id="up_menu_id_bak" value="<%=up_menu_id %>" type="hidden" />		
			</div>
			</td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				菜单级别:
			</td>
			<td><span id="edit_menu_class"><%=menu_class %></span></td>
			<input name="menu_class" id="menu_class" value="<%=menu_class %>" type="hidden" />	
		</tr>
		
<tr>
	<td align="right" width="10%">
		排序:
	</td>
	<td><input name="rsrv_str0" id="rsrv_str0" type="text" size="4" value="<%=rsrv_str0%>" maxlength="4" onKeyUp="if(!/^[0-9][0-9]*$/.test(this.value))this.value=''"/></td>
</tr>
<tr>
	<td align="right" width="10%">
		显示/隐藏:
	</td>
	<td>
	显示<input name="remove_tag" id="remove_tag_1" value="1" type="radio" <%if(remove_tag.equals("1")){%>checked<%}%> /> &nbsp;
	隐藏<input name="remove_tag" id="remove_tag_1" value="2" type="radio" <%if(remove_tag.equals("2")){%>checked<%}%> />
	</td>
</tr>		
		
<tr>
	<td align="right" width="10%">
		是否创建模型表:
	</td>
	<td>
	
	是<input name="is_create_module" id="is_create_module_1" type="radio" value="0" checked/>
	否<input name="is_create_module" id="is_create_module_2" type="radio" value="1" />
	
	</td>
</tr>

<tbody id="is_create_module_hidden">
<tr>
	<td align="right" width="10%">
		菜单模型名称:
	</td>
	<td><input name="module_name" id="module_name" type="text" value="<%=module_name%>" /></td>
</tr>

<tr>
	<td align="right" width="10%">
		文件名称:
	</td>
	<td><input name="module_file" id="module_file" type="text" value="<%=module_file%>" /></td>
</tr>

<tr>
	<td align="right" width="10%">
		页面地址:
	</td>
	<td><input name="module_dir" id="module_dir" type="text"  value="<%=module_dir%>"/></td>
</tr>
<tr>
	<td align="right" width="10%">
		菜单说明:
	</td>
	<td>
		<textarea name="rsrv_str1" id="rsrv_str1" cols=60 rows=5 ><%=rsrv_str1%></textarea></td>
</tr>
</tbody>

		

		
<input name="menu_id" id="menu_id" value="<%=menu_id %>" type="hidden" />			
<input name="menu_type" id="menu_type" value="<%=menu_type %>" type="hidden" />
<input name="module_id" id="module_id" value="<%=module_id %>" type="hidden" />	
<input name="rsrv_str0" id="rsrv_str0" value="<%=rsrv_str0 %>" type="hidden" />
<input name="in_staff_id" id="in_staff_id" value="<%=in_staff_id %>" type="hidden" />
<input name="in_date" id="in_date" value="<%=in_date %>" type="hidden" />
<input name="remark" id="remark" value="<%=remark %>" type="hidden" />
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="1146" />
				<input type="button" class="buttoncss" name="tradeSub" value="提交" onclick="formSubmit();" />&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='index.jsp';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
